package com.itheima.a01mystream;

import java.util.Arrays;

public class StreamDemo3 {
    public static void main(String[] args) {
        //数组中的元素使用stream进行遍历
        //基本数据类型
        int[] arr = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};

        //引用数据类型
        String[] arr2 = {"a", "b", "c", "d"};
        Arrays.stream(arr).forEach(s -> System.out.println(s));
        System.out.println("==================================");
        Arrays.stream(arr2).forEach(s -> System.out.println(s));
    }
}
